package com.lago.homework2.exercise3;

public class Customer {
    private int callTime;
    private int interData;
    private double monthFee;

    public Customer() {
    }

    public Customer(int callTime, int interData, double monthFee) {
/*        this.callTime = callTime;
        this.interData = interData;
        this.monthFee = monthFee;*/
        setInterData(interData);
        setMonthFee(monthFee);
        setCallTime(callTime);
    }

    public int getCallTime() {
        return callTime;
    }

    public void setCallTime(int callTime) {
        if(callTime >= 0) {
            this.callTime = callTime;
        }else {
            System.out.println("通话时间不合理呀！");
        }
    }

    public int getInterData() {
        return interData;
    }

    public void setInterData(int interData) {
        if(interData >= 0) {
            this.interData = interData;
        }else {
            System.out.println("用户流量不合理呀！");
        }
    }

    public double getMonthFee() {
        return monthFee;
    }

    public void setMonthFee(double monthFee) {
        if (monthFee >= 0) {
            this.monthFee = monthFee;
        }else {
            System.out.println("每月的消费不合理呀！");
        }
    }
}
